<?php $atr=array(
					"name"=>"section",
					"onsubmit"=>"return checkSection()"
				  ); 
echo form_open('section',$atr); ?> 
  
<?php $bar='Section List';?>
<table id="box-table-a" cellspacing="1" align="right" width="900px">
	<tr><td colspan=7 align=right class=bar><?php echo $bar;?></td></tr>
   		<tr>
   			<th>Session_ID</th>
   			<th>SessionName</th>
   			<th>Department_ID</th> 
   			<th>Action</th>  			
   		</tr> 		
  		
<?php if (isset($result)){?>
   	
   		<?php foreach ($result as $row):?> 
		<tr>
					
			<td class="row1"><?php echo $row->Session_ID; ?> </td>
			<td class="row1"><?php echo $row->SessionName ;?> </td>			
			<td class="row1"><?php echo $row->Department_ID;?> </td>
			<td class="row1" align="center">
				 <?php echo '<id=a>'.anchor("section/edit/$row->Session_ID",'<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>').'</a>';?>
				 <?php echo '<id=a  onclick="return checkLink();">'.anchor("section/delete/$row->Session_ID",'<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>').'</a>';?> 
			</td>			
		</tr>	   
 		<?php endforeach; ?>				
   		<tr>   			
   			<td><input type="text" name ="Session_ID" /></td>
   			<td><input type= "text" name ="SessionName"/></td>   			
   		    <td><?php echo form_dropdown('Department_ID', $Department, 'large');?></td>   			
   			<td align="center"><input type="submit" id="submit" value="insert"/> </td>
   		</tr>
   		<tr>
   			<td colspan="4"><?php echo $this->pagination->create_links(); // tạo link phân trang?> </td>
   		</tr>
   		<tr>
   			<td id="abc" colspan="4">
			   	<?php if (isset($error)){
					echo "<br/>";   			
			   		echo '<h3>'.$error.'</h3>';
					echo '<br/>';
			   	}   	
			   	?>
   			</td>
   		</tr>
   	</table>
   	
   	<br />
    			
   	
 <?php }?>
